<?php

namespace app\models;

use Yii;
use yii\base\Model;

/**
 * ContactForm is the model behind the contact form.
 */
class RetrievePasswordForm extends Model
{
    public $password;

    public $repeatPassword;

    /**
     * @return array the validation rules.
     */
    public function rules()
    {
        return [
            // name, email, subject and body are required
            [['password', 'repeatPassword'], 'required'],
            [['password','repeatPassword'], 'string', 'max' => 26],
            [['password','repeatPassword'], 'string', 'min' => 6],
            ['repeatPassword', 'compare','compareAttribute'=>'password'],
        ];
    }

    /**
     * @return array customized attribute labels
     */
    public function attributeLabels()
    {
        return [
            'password'=>Yii::t('User','New Password'),
            'repeatPassword'=>Yii::t('User','Repeat Password'),
        ];
    }
}
